package club.mzwh.core.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import club.mzwh.common.util.HttpGetUtil;
import club.mzwh.common.util.StringUtil;

@Controller
public class LoginAction {
	
	
	@RequestMapping(value = "/login", method = RequestMethod.GET)
	public void listGet(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap, Authentication auth) {
		try {
			modelMap.put("menus", "");
			response.sendRedirect(request.getContextPath()+"/index");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public void listGet1(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) {
		try {
			modelMap.put("menus", "");
			response.sendRedirect(request.getContextPath()+"/index");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	@RequestMapping(value = "/auth/nw", method = RequestMethod.GET)
	public void listGet2(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) {
		try {
			modelMap.put("menus", "");
			response.sendRedirect(request.getContextPath()+"/index");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}
